package com.haixiaoke.saas.dept.domain;

import com.haixiaoke.saas.common.utils.TreeUtil.ITree;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Objects;

/**
 * @Author panda
 * @Date 2024/3/20
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class DeptTree extends ITree<String> {

    /**
     * 名称
     */
    private String name;


    @Override
    protected boolean firstLevel() {
        return Objects.equals(getParentId(), "0");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
